<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="base.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>home</title>
  </head>
  <body>
   <div class="container">
		<div class="row"> 
			<div class = "span2 well" style="margin-right:20px; margin-top:70px;">				
				<ul class="nav nav-list">					 					
				  <li class="active"><a href="${basePath }/dish.jspx">店长推荐（2）</a></li>
				  <li><a href="${basePath }/dish.jspx?s=onsale">今日特价（1）</a></li>
				   <li><a href="${basePath }/dish.jspx?s=pop">最受欢迎（4）</a></li>	
				  <li><a href="${basePath }/dish.jspx?s=esp">特色（2）</a></li>			   
				  <li><a href="${basePath }/dish.jspx?s=cold">凉菜（5）</a></li>
				  <li><a href="${basePath }/dish.jspx?s=hot">炒菜（12）</a></li>
				  <li><a href="${basePath }/dish.jspx?s=ganguo">干锅（3）</a></li>
				  <li><a href="${basePath }/dish.jspx?s=fish">鱼（5）</a></li>
				  <li><a href="${basePath }/dish.jspx?s=mainfood">主食（4）</a></li>	
				  <li><a href="${basePath }/dish.jspx?s=jiu">酒水（15）</a></li>
				  <li><a href="${basePath }/dish.jspx?s=sweet">甜品（6）</a></li>
				</ul>					
			</div>
			<div class="span9" style="margin-right:20px; margin-top:70px;">
				<c:forEach items="${orderList }" var="order">
					<div class="row well" style="width:690px;">
						<c:forEach items="${userList }" var="user">
							<c:if test="${user.id == order.user_id }">
								<div class="span2" style="margin-left:15px;margin-right:0px;">
									<img src="img/${user.tou_xiang }" alt="" />
									<span>工号：${user.id }</span><br/><span>姓名：${user.username }</span>
								</div>
							</c:if>
						</c:forEach>
							<div class="span6" style="margin-left:0px;width:520px;">
								<table class="table table-hover  table-bordered table-condensed">
									<tr>
										<th>编号</th>
										<th>菜名</th>
										<th>价格</th>
									</tr>
									<c:forEach items="${order.menuList }" var="menu" varStatus="v">
										<tr>
											<td>${v.count }</td>
											<td>${menu.dish_name }</td>
											<td>${menu.price }&nbsp;元</td>
										</tr>
										<c:set value="${menu.price }" var="price"/>
										<c:set value="${sum+price }" var="sum"/>
									</c:forEach>
									<tr> 
										<td colspan="3"><span style="margin-left:15px;font-size:12px;color:#6020c0;">${order.table_num }号桌</span>
											<span style="margin-left:20px;font-size:12px;color:#6020c0;">就餐人数${order.people_num }人</span>
											<span style="margin-left:20px;font-size:12px;color:#6020c0;">开桌时间：${order.create_time }</span>
											<span style="margin-left:20px;font-size:12px;color:#6020c0;">合计：${sum } 元</span>
											<c:if test="${order.status == true}">
												<span style="margin-left:20px;font-size:12px;color:#6020c0;">已付款</span>
											</c:if>
											<c:if test="${order.status == false}">
												<span style="margin-left:20px;font-size:12px;color:#6020c0;">未付款</span>
											</c:if> 
											<c:set value="${0 }" var="sum"/>
										</td>
									</tr>
								</table>
							</div>
					</div>
				</c:forEach>
			</div>
		</div>
		
	</div>
  </body>
</html>
